import request from '@/utils/request'
//获取目录状态
export const getdirectorysimpleApi = (data) => {
    return request({
        url: '/directorys/' + data.id + '/' + data.state, 
        method:'post',
        data
    })
}

//获取所有目录列表
export const getdirectoryListApi = (params) => {
    return request({
        url: '/directorys',
        method: 'get',
        params
   })
}

//根据id获取目录详情
export const getdirectoryInfoApi = (data) => {
    return request({
        url: '/directorys/' + data.id,
        method: 'get',
        params:data
   })
}

//增加目录
export const adddirectoryApi = (data) => {
    return request({
        url: '/directorys',
        method: 'post',
        data
   })
}

//修改目录详情
export const editdirectoryApi = (data) => {
    return request({
        url: '/directorys/' + data.id,
        method: 'put',
        data
   })
}

//删除目录数据
export const deldirectoryApi = (id) => {
    return request({
        url: '/directorys/' + id,
        method: 'delete',
   })
}